package com.qixiucoding.link.inherit.dao;

import com.alibaba.fastjson.JSONArray;
import com.qixiucoding.dao.MyDao;
import com.qixiucoding.link.AbstractLink;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @Author longhj
 * @Description 查询数据库2
 * @Date 2021/10/14 星期四 23:58
 */
@Component
@Scope(value = "prototype")
public class Dao2Inherit extends AbstractLink {
    @Autowired
    private MyDao myDao;
    @Override
    public JSONArray doDeal(JSONArray jsonArray) {
        jsonArray.stream().forEach(e->{
            System.out.println("Dao2Inherit:"+myDao.insert());
        });
        return jsonArray;
    }
}
